package NGUYENHUUDUC.OOP.EX4;

public class MODELS {
	public double DATECONTROLLER (short thang , short nam){
	double result = 0;
	switch (thang){
	case 1:
	case 3:
	case 5:
	case 7:
	case 8:
	case 10:
	case 12:
		result=31;
		break;
	case 2:{
		if((nam%4==0)||(nam%400==0 && nam%100!=0))
			result=29;
		else
			result =28;
	}break;
	case 4:
	case 6:
	case 9:
	case 11:
		result = 30;
	break;	
	}
	return result;
	}
}
